import moment from "moment";
export function getTabTime(type) {
    let startTime = ''
    let endTime = ''
    if (type === '今天') {
        startTime = moment().format("yyyy-MM-DD") + " 00:00:00"
        endTime = moment().format("yyyy-MM-DD") + " 23:59:59"
    } else if (type === '明天') {
        startTime = moment().subtract(-1, "days").format("YYYY-MM-DD") + " 00:00:00"
        endTime = moment().subtract(-1, "days").format("YYYY-MM-DD") + " 23:59:59"
    } else if (type === '后天') {
        startTime = moment().subtract(-2, "days").format("YYYY-MM-DD") + " 00:00:00"
        endTime = moment().subtract(-2, "days").format("YYYY-MM-DD") + " 23:59:59"
    } else if (type === '一周') {
        startTime = moment().subtract(0, "days").format("YYYY-MM-DD") + " 00:00:00"
        endTime = moment().subtract(-6, "days").format("YYYY-MM-DD") + " 23:59:59"
    } else if (type === '一月') {
        startTime = moment().subtract(0, "days").format("YYYY-MM-DD") + " 00:00:00"
        endTime = moment().subtract(-29, "days").format("YYYY-MM-DD") + " 23:59:59"
    }
    return {startTime, endTime}
}